/*
 * Copyright © 2019-2020  Whale Cloud, Inc. All Rights Reserved.
 *
 * Notice: Whale Cloud Inc copyrights this specification.
 * No part of this specification may be reproduced in any form or means,
 * without the prior written consent of Whale Cloud Inc.
 *
 */
package com.wteam.modules.system.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wteam.modules.system.domain.Section;
import lombok.Data;
import java.io.Serializable;


import java.sql.Date;
import java.sql.Timestamp;

import java.util.LinkedHashSet;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.data.annotation.Transient;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import javax.persistence.Column;

/**
 * 课程 DTO类.
 *
 * @author herry_wong
 * @since 2020-12-28
 */
@Data
@Document(indexName = "course")
public class CourseDTO implements Serializable {
    /** 防止精度丢失 */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /** 课程名称 */
    @ApiModelProperty("课程名称")
    private String name;

    /** 课程简介 */
    @ApiModelProperty("课程简介")
    private String detail;


    private Long classId;

    /** 学分类型 */
    @ApiModelProperty("学分类型")
    private Long typeId;

    /** 学分 */
    @ApiModelProperty("学分")
    private Double credit;

    /** 是否必修 */
    @ApiModelProperty("是否必修")
    private Boolean compulsory;

    /** 创建时间 */
    @ApiModelProperty("创建时间")

    private Timestamp createdAt;


    /** 创建人 */
    @ApiModelProperty("创建人")
    private Long createdBy;


    private Date startTime;


    private Date endTime;


    private String code;

    private Long teacherId;
    private TeacherDTO teacherDTO;

    private Double radio;

    private LinkedHashSet<SectionDTO> sections;


}